package com.gupaoedu.design.strategy.order;

import com.gupaoedu.design.strategy.pay.PayStatus;
import com.gupaoedu.design.strategy.pay.PayWay;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2018/3/13.
 */
public class Order {

    private String uid;
    private String name;
    private double amount;

    public Order() {

    }

    public Order(String uid, String name, double amount) {
        this.uid = uid;
        this.name = name;
        this.amount = amount;
    }

    public PayStatus pay(PayWay way) {
        return way.get().pay(this.uid, this.amount);
    }
}
